package com.example.sonone.controller;

import com.example.sonone.pojo.Demo;
import com.example.sonone.pojo.Stu;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

/* ━━━━━━佛祖保佑━━━━━━
 *                  ,;,,;
 *                ,;;'(    社
 *      __      ,;;' ' \   会
 *   /'  '\'~~'~' \ /'\.)  主
 * ,;(      )    /  |.     义
 *,;' \    /-.,,(   ) \    码
 *     ) /       ) / )|    农
 *     ||        ||  \)
 *     (_\       (_\
 * ━━━━━━永无BUG━━━━━━
 * @author ：zjq
 * @date ：2021/3/20 15:49
 * @description: TODO  测试 xss https://blog.csdn.net/weixin_45534422/article/details/99695501
 *                      替换json  https://blog.csdn.net/qq_36521507/article/details/105770952
 * @version: V1.0
 * @slogan: 天下风云出我辈，一入代码岁月催
 */
@RestController
@RequestMapping("xss")
public class TestXssController {


    @PostMapping(value = "/xss")
    public Object test(String name) {
        System.out.println(name);
        return name;
    }

    @PostMapping(value = "/form")
    public Object form( Demo demo) {
        System.out.println(demo.toString());
        return demo;
    }



    @PostMapping(value = "/json")
    public Object testJSON(@RequestBody Demo param) {
        System.out.println(param.toString());
        return param;
    }

    @GetMapping(value = "/query")
    public Object testQuery(String q) {
        return q;
    }



}
